/*****************************************************
*                                                                          
*               COPYRIGHT (c) 2015-2017 Hargic Corporation                 
*                         All Rights Reserved                              
*                                                                          
* The source code contained or described herein and all documents          
* related to the source code ("Material") are owned by Hargic            
* Corporation or its licensors.  Title to the Material remains             
* with Hargic Corporation or its suppliers and licensors.                  
*                                                                          
* The Material is protected by worldwide copyright and trade secret        
* laws and treaty provisions. No part of the Material may be used,         
* copied, reproduced, modified, published, uploaded, posted, transmitted,  
* distributed, or disclosed in any way except in accordance with the       
* applicable license agreement.                                            
*                                                                          
* No license under any patent, copyright, trade secret or other            
* intellectual property right is granted to or conferred upon you by       
* disclosure or delivery of the Materials, either expressly, by            
* implication, inducement, estoppel, except in accordance with the         
* applicable license agreement.                                            
*                                                                          
* Unless otherwise agreed by Hargic in writing, you may not remove or      
* alter this notice or any other notice embedded in Materials by Hargic    
* or Hargic's suppliers or licensors in any way.                           
*                                                                          
** Author: shengda.huang
** Date: 2018-11-24
*
*****************************************************/

#ifndef __SYS_SHELL_H_
#define __SYS_SHELL_H_

#ifdef __cplusplus
extern "C"{
#endif

/***** INCLUDES *************************************/
#include <stdarg.h>
#include <getopt.h>
#include <stdlib.h>

/***** DEFINES **************************************/
#define DNA_SHELL_RECV_BUFF_SIZE            (4 * 64)
#define SYS_SHELL_CMD_LENGTH_MAX			64

enum
{
	SYS_SHELL_SUCCESS = 0,
	SYS_SHELL_EXIT = 1,
}
	
/***** TYPEDEFS *************************************/

/***** CONSTANTS ************************************/

/***** VARIABLES ************************************/

/***** EXTERNAL VARIABLES ***************************/

/***** EXTERNAL FUNCTIONS ***************************/

/***** PROTOTYPES ***********************************/
int sys_shell_init(void);
int sys_shell_register(char *cmd, char *desc, int (*func)(int, char**));
int sys_shell_handler(char *input, int inlen);


#ifdef __cplusplus
}
#endif

#endif /* __SYS_SHELL_H_ */

